package com.appspot.androidquote.webapp;

import java.io.IOException;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.appspot.androidquote.webapp.dao.MessageDao;

@SuppressWarnings("serial")
public class ServletDeleteMessage extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
		
		long idMessage = Long.parseLong(req.getParameter("id"));
		
		MessageDao.INSTANCE.removeMessage(idMessage);
		
		resp.sendRedirect("/Messages.jsp");
	}
}
